/* Set initial parameters */
price = 40; 
pi = 0.4; 
lambda = 10; 
kappa = 0.02;  

/* Plot expected underpricing */
dataEU=Table[100*((lambda (1+M) (2+M) Gamma[J+M])/(3 Gamma[3+J+M]))/price,{M,1,40,1},{J,0,20,1}];
fig2a=ListPlot3D[dataEU,ImageSize->700,MeshFunctions->{#1&,#2&},Mesh->{40,20},AxesLabel -> {"J","N","\!\(\*SubscriptBox[\(E\), \(0\)]\)(U)"},LabelStyle -> {FontSize ->15, FontFamily -> "Arial",Black},AxesStyle->20,ScalingFunctions -> {Identity, Identity,"Log"},PlotRange->{ Automatic,Automatic,{0,7}},ColorFunction -> "SiennaTones"] 

/* Plot expected search cost */
dataEK=Table[(100/price)*kappa*M*(1+HarmonicNumber[M+J]-HarmonicNumber[M]),{M,1,40,1},{J,0,20,1}];
fig2b=ListPlot3D[dataEK,ImageSize->700,MeshFunctions->{#1&,#2&},Mesh->{40,20},AxesLabel -> {"J","N","\!\(\*SubscriptBox[\(E\), \(0\)]\)(K/Q)"},LabelStyle -> {FontSize->15,FontFamily->"Arial",Black},AxesStyle->20,ScalingFunctions -> {Identity,Identity,Identity},ColorFunction ->"SiennaTones"] 

